package com.example.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class MySqlit extends SQLiteOpenHelper {
    //数据库的名字和版本已指定
    Context context;
    public MySqlit(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

//初始化数据库
    @Override
    public void onCreate(SQLiteDatabase db)
    {
        String sql="create table stu(name text, num text,age ingeter)";
         db.execSQL(sql);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }


}
